#include "ScnsIcm20602.c.h"

#if defined(SCNS_ICM20602_ENABLE)&&SCNS_ICM20602_ENABLE==1

ScnsStatus scnsBspIcm20602Init(ScnsIcm20602Enum icmN)
{
    spi_init(SPI_3,SPI_MODE0,10*1000*1000,SPI3_MAP0_SCK_B3,SPI3_MAP0_MOSI_B5,SPI3_MAP0_MISO_B4,SPI_CS_NULL);
    gpio_init(C10,GPO,1,GPO_PUSH_PULL);
    return SCNS_STATUS_OK;
}

void scnsBspIcm20602RW(ScnsIcm20602Enum icmN,uint8*val,uint32 num)
{
    gpio_set_level(C10,0);
    spi_transfer_8bit(SPI_3,val,val,num);
    gpio_set_level(C10,1);
}

#endif